package com.zy.untils.base64;



public class OpenApiException extends RuntimeException {
    private int code;

    public OpenApiException(int code, String msg) {
        super(msg);
        this.code = code;
    }

    public OpenApiException(int code, String msg, Throwable cause) {
        super(msg, cause);
        this.code = code;
    }

    public OpenApiException(OpenApiCode openApiCode) {
        super(openApiCode.getDesc());
        this.code = openApiCode.getCode();
    }

    public OpenApiException(OpenApiCode openApiCode, Throwable cause) {
        super(openApiCode.getDesc(), cause);
        this.code = openApiCode.getCode();
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return super.getMessage();
    }
}
